﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Setting.master" AutoEventWireup="true" CodeFile="RoleUsers.aspx.cs" Inherits="Setting_RoleUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SettingHeader" Runat="Server">
	<style type="text/css">
         #searchBar{ padding:10px 0px 5px 0px;}
         #btnBar{ padding:10px 0px; }
         .editFormSubbar{ padding:5px; background-color:#CECECE; color:#000000; font-weight:bold;}
         .editFormSubbar2{ margin-top:10px; padding:5px; color:#353535; font-weight:bold; font-size:13px;}
     </style>
     <script type="text/javascript">
     	$(function () {
     		$('.commonTable tr').hover(function () {
     			$(this).css('background-color', '#ffffae');
     		},
            function () {
            	$(this).css('background-color', '#FFFFFF');
            });
     	});

        function addUser() {
        	window.open('dlg_user.aspx?selmode=2', '', 'width=400px,height=400px,scrollbars=1,resizable=no,left=' + (screen.availWidth - 400) / 2 + ',top=' + (screen.availHeight - 400) / 2);
     	}
     	function delEmplUser(id) {
     		if (confirm('确定删除?'))
     			window.location = "roleusers.aspx?delID=" + id;
     	}
     	function GoPage(n) {
     		window.location = "roleusers.aspx?p=" + n;
     	}
     	function recvSelectUser(selNodes) {
     		if (selNodes != null && typeof (selNodes) != 'undefined') {

     			var selEmplId = '';
     			$.map(selNodes, function (node) {
     				selEmplId += "," + node.data.key;
     			});

     			$.post("do_SaveEmplRole.aspx", { roleID: '<%=roleID %>', emplID: selEmplId },
			        function (data) {
			        	if (data == "ok")
			        		window.location.reload();
			        	else
			        		alert("保存失败!");
			        });
     		}
		}
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SettingContent" Runat="Server">
<div class="navTitle"><a href="/setting">系统设置</a> > <a href="/setting/roles.aspx">角色</a> > 角色人员</div>
<div class="editFormSubbar2"><%=roleName %> 的角色人员</div>
<div>
    <table class="commonTable" cellspacing="0" cellpadding="5" >
	    <tr>
		    <th>姓名</th>
		    <th>部门</th>
		    <th>
		    </th>
	    </tr>
        <% WriteTableData();%>
	</table>
	<div class="gridPager">
		<%WriteTablePager(); %>
	</div>
    <div id="btnBar"><input type="button" value="添加人员" onclick="addUser()" /></div>
</div>
</asp:Content>

